#!/bin/sh

# replace environment variable because this version of promtail doesn't support environment variable in the config yaml file.
sed -i 's/\${DATAKIT_HOST}/'"${DATAKIT_HOST}"'/g' /etc/promtail/config.yml
sed -i 's/\${DATAKIT_PORT}/'"${DATAKIT_PORT}"'/g' /etc/promtail/config.yml
/root/promtail -config.file=/etc/promtail/config.yml
